CURRENT_MAKEFILE=$(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
CURRENT_MAKEFILE_DIRECTORY=$(dir $(abspath $(call CURRENT_MAKEFILE)))

GIT2_REPOSITORY:=$(abspath $(call CURRENT_MAKEFILE_DIRECTORY)/..)
BIN_GIT2_DIRECTORY:=${GIT2_REPOSITORY}/bin
TESTS_DIRECTORY:=$(call CURRENT_MAKEFILE_DIRECTORY)
GIT_REPOSITORY=${TESTS_DIRECTORY}/git_repo

export GIT_TEST_INSTALLED=${TESTS_DIRECTORY}
export BIN_GIT2=${BIN_GIT2_DIRECTORY}/sgit
export BIN_GIT_DIRECTORY=${GIT_REPOSITORY}/bin-wrappers

all:
	${MAKE} -C "${GIT_REPOSITORY}" all;
	${MAKE} -C "${GIT_REPOSITORY}"/t;

.DEFAULT:
	${MAKE} -C "${GIT_REPOSITORY}" all;
	${MAKE} -C "${GIT_REPOSITORY}"/t $@;
